using System.ComponentModel.DataAnnotations;

namespace AiQiuQuan.Sport.Model.Models
{
    /// <summary>
    /// 新增比赛淘汰赛对阵dto
    /// </summary>
    public class GameKnockoutVersusAddDto
    {
        /// <summary>
        /// 比赛ID
        /// </summary>
        [Required(ErrorMessage = "比赛ID必填")]
        public Guid GameId { get; set; }

        /// <summary>
        /// 对阵类型，1单打、2双打、3男单、4女单、5男双、6女双、7混双
        /// </summary>
        [Required(ErrorMessage = "对阵类型，1单打、2双打、3男单、4女单、5男双、6女双、7混双必填")]
        public int VersusType { get; set; }

        /// <summary>
        /// 淘汰赛轮次ID
        /// </summary>
        [Required(ErrorMessage = "淘汰赛轮次ID必填")]
        public Guid KnockoutRoundsId { get; set; }

        /// <summary>
        /// 当前淘汰赛队伍数
        /// </summary>
        [Required(ErrorMessage = "当前淘汰赛队伍数必填")]
        public int KnockoutCount { get; set; }

        /// <summary>
        /// 淘汰赛阶段名称
        /// </summary>
        [Required(AllowEmptyStrings = false, ErrorMessage = "淘汰赛阶段名称必填")]
        [StringLength(50, ErrorMessage = "淘汰赛阶段名称不能超过50个字符")]
        public string KnockoutName { get; set; }

        /// <summary>
        /// 轮次内序号
        /// </summary>
        [Required(ErrorMessage = "轮次内序号必填")]
        public int LoopNo { get; set; }

        /// <summary>
        /// 左边队伍编号
        /// </summary>
        [Required(AllowEmptyStrings = false, ErrorMessage = "左边队伍编号必填")]
        [StringLength(5, ErrorMessage = "左边队伍编号不能超过5个字符")]
        public string Team1No { get; set; }

        /// <summary>
        /// 左边队伍用户1ID
        /// </summary>
        public Guid? Team1User1Id { get; set; }

        /// <summary>
        /// 左边队伍用户2ID
        /// </summary>
        public Guid? Team1User2Id { get; set; }

        /// <summary>
        /// 左边队伍得分
        /// </summary>
        [Required(ErrorMessage = "左边队伍得分必填")]
        public int Team1Score { get; set; }

        /// <summary>
        /// 右边队伍编号
        /// </summary>
        [Required(AllowEmptyStrings = false, ErrorMessage = "右边队伍编号必填")]
        [StringLength(5, ErrorMessage = "右边队伍编号不能超过5个字符")]
        public string Team2No { get; set; }

        /// <summary>
        /// 右边队伍用户1ID
        /// </summary>
        public Guid? Team2User1Id { get; set; }

        /// <summary>
        /// 右边队伍用户2ID
        /// </summary>
        public Guid? Team2User2Id { get; set; }

        /// <summary>
        /// 右边队伍得分
        /// </summary>
        [Required(ErrorMessage = "右边队伍得分必填")]
        public int Team2Score { get; set; }

        /// <summary>
        /// 开始名次
        /// </summary>
        [Required(ErrorMessage = "开始名次必填")]
        public int StartRank { get; set; }

        /// <summary>
        /// 结束名次
        /// </summary>
        [Required(ErrorMessage = "结束名次必填")]
        public int EndRank { get; set; }

        /// <summary>
        /// 是否双打
        /// </summary>
        [Required(ErrorMessage = "是否双打必填")]
        public bool IsDouble { get; set; }

        /// <summary>
        /// 是否结束
        /// </summary>
        [Required(ErrorMessage = "是否结束必填")]
        public bool IsFinished { get; set; }

        /// <summary>
        /// 是否附加赛
        /// </summary>
        [Required(ErrorMessage = "是否附加赛必填")]
        public bool IsExtra { get; set; }

        /// <summary>
        /// 开始时间
        /// </summary>
        [StringLength(10, ErrorMessage = "开始时间不能超过10个字符")]
        public string? StartTime { get; set; }

        /// <summary>
        /// 结束时间
        /// </summary>
        [StringLength(10, ErrorMessage = "结束时间不能超过10个字符")]
        public string? EndTime { get; set; }

        /// <summary>
        /// 地点
        /// </summary>
        [StringLength(100, ErrorMessage = "地点不能超过100个字符")]
        public string? Address { get; set; }
    }
}
